<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="pragma" content="no-cache"> 
<meta http-equiv="Cache-Control" content="no-cache,  no-store,must-revalidate"> 
<meta http-equiv="expires" content="0"> 
<title>上传照片</title>
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="//g.alicdn.com/msui/sm/0.6.2/css/sm.min.css">
<link rel="stylesheet" href="assets/css/rz.css">
<link rel="stylesheet" href="assets/css/LUploader.css">
</head>
<body>
	<div class="page-group">
		<div class="page page-current" id="index">
			<header class="bar bar-nav">
				<a href="promotion/buy" id="back" class="button button-link button-nav pull-left back" external>
					<span class="icon icon-left"></span> 返回
				</a>
				<h1 class='title'>上传照片</h1>
			</header>
			
			<!-- 页面正文 -->
			<div class="content">
				
				<div class="card">
					<div class="card-content">
						<div class="row">
							<div class="LUploader col-50" id="demo1">
								<div class="LUploader-container" >
									<input data-LUploader='demo1' data-form-file='basestr' data-upload-type='身份证正面' type="file" accept="image/*" name="IdFront"/>
									<ul class="LUploader-list"></ul>
								</div>
								<div>
									<div class="icon icon-camera font20"></div>
									<p>身份证正面</p>
								</div>
							</div>
							<div class="LUploader col-50" id="demo2">
								<div class="LUploader-container">
									<input data-LUploader='demo2' data-form-file='basestr' data-upload-type='身份证反面' type="file" accept="image/*"/>
									<ul class="LUploader-list"></ul>
								</div>
								<div>
									<div class="icon icon-camera font20"></div>
									<p>身份证反面</p>
								</div>
							</div>
						</div>
						<br>
						<div class="row">
							<div class="LUploader col-50" id="demo3">
								<div class="LUploader-container">
									<input data-LUploader='demo3' data-form-file='basestr' data-upload-type='银行卡正面' type="file" accept="image/*"/>
									<ul class="LUploader-list"></ul>
								</div>
								<div>
									<div class="icon icon-camera font20"></div>
									<p>银行卡正面</p>
								</div>
							</div>
							<div class="LUploader col-50" id="demo4">
								<div class="LUploader-container">
									<input data-LUploader='demo4' data-form-file='basestr' data-upload-type='银行卡反面' type="file" accept="image/*"/>
									<ul class="LUploader-list"></ul>
								</div>
								<div>
									<div class="icon icon-camera font20"></div>
									<p>银行卡反面</p>
								</div>
							</div>
						</div>
						<br>
						<div class="row">
							<div class="LUploader col-50" id="demo5">
								<div class="LUploader-container">
									<input data-LUploader='demo5' data-form-file='basestr' data-upload-type='手持身份证照片' type="file" accept="image/*"/>
									<ul class="LUploader-list"></ul>
								</div>
								<div>
									<div class="icon icon-camera font20"></div>
									<p>手持身份证照片</p>
								</div>
							</div>
						</div>
					</div>
				</div>
				
				<div class="content-block">
					<div class="row">
						<div class="col-100">
							<a id="submit" href="promotion/buy?uploadimg=1" class="button button-big button-fill button-success">保&nbsp;&nbsp;&nbsp;&nbsp;存</a>
						</div>
					</div>
				</div>
				
				<!-- 页脚 -->
				<%@ include file="/include/footer.jsp"%>
			</div>
		</div>
	</div>
	
	<script src="assets/js/LUploader.js"></script>
	<script>
    [].slice.call(document.querySelectorAll('input[data-LUploader]')).forEach(function(el) {
        new LUploader(el, {
            url: 'policy/picturehandler',//post请求地址
            multiple: false,//是否一次上传多个文件 默认false
            maxsize: 102400,//忽略压缩操作的文件体积上限 默认100kb
            accept: 'image/*',//可上传的图片类型
            quality: 0.1,//压缩比 默认0.1  范围0.1-1.0 越小压缩率越大
            showsize:false//是否显示原始文件大小 默认false
        });
    });
    </script>
</body>
</html>
